Using these data :

sales_train.csv test.csv sample_submission.csv items.csv item_categories.csv shops.csv

forecast the total amount of products sold in every shop for the test set.

Data fields.

Attributes:

ID - an Id that represents a (Shop, Item) tuple within the test set shop_id - unique identifier of a shop item_id - unique identifier of a product item_category_id - unique identifier of item category item_cnt_day - number of products sold. You are predicting a monthly amount of this measure item_price - current price of an item date - date in format dd/mm/yyyy date_block_num - a consecutive month number, used for convenience. January 2013 is 0, February 2013 is 1,..., October 2015 is 33 item_name - name of item shop_name - name of shop item_category_name - name of item category

Getting quick information on our data

What is our findings?

**Checking for Outliers in numerical columns

Dealing with outliers

Exploratory Data Analysis

Identifying Top shops and Item Categories

**Time series analysis

  1. trend analysis for Item_cnt_day(amoun of products sold)
  2. Monthly analysis of sales(seasonal trends)

What are our findings from EDA?

We can clearly see that month is an important feature and could be key to the patterns formed over the 3 years.However, we will confirm this in our featureimortance during modelling

Modelling

Creating a training and validation set

Training using Random Forest Regressor

**What are our findings?

Hyperparameter Tuning

NB: The most important arguments in RandomizedSearchCV are:

 1. **n_iter** - which controls the number of different combinations to try
 2. **cv** - which is the number of folds to use for cross validation

To Predict item_cnt_month for the test using above model

XGBOOST MODELLING

Comparisons

**Model Evaluation

model_adj=XGBRegressor(random_state=42, n_jobs=-1,n_estimators=50, max_depth=7, eta=0.1, subsample=1.0, colsample_bytree=1.0).fit(train_inputs,train_targets)

References

https://www.kaggle.com/competitions/competitive-data-science-predict-future-sales/overview